<?php
/*
 * get valid session string
 */
require_once ('../lib/config.php');
require_once ('../lib/facebook.php');
require_once ('../lib/util.php');

//session_start();

$facebook = new Facebook(array(
    'appId'  => FB_APP_ID,
    'secret' => FB_APP_SECRET
));

//trace($_SESSION['fb_session']);

//$facebook->setSession($_SESSION['fb_session']);

try{
    $me = $facebook->api('/me');
    trace($me);
    $friends = $facebook->api('/me/feed');
    trace($friends);
}catch(FacebookApiException $e){
    error_log($e);
}
